<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Navo Portable Library: 红黑树</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- 制作者 Doxygen 1.7.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Navo Portable Library&#160;<span id="projectnumber">Ver 1.0.20120827</span></div>
   <div id="projectbrief">Provides generic platform independent facilities.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="modules.html"><span>模块</span></a></li>
      <li><a href="annotated.html"><span>数据结构</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">数据结构</a> &#124;
<a href="#define-members">宏定义</a> &#124;
<a href="#typedef-members">类型定义</a> &#124;
<a href="#func-members">函数</a> &#124;
<a href="#var-members">变量</a>  </div>
  <div class="headertitle">
<h1>红黑树</h1>  </div>
<div class="ingroups"><a class="el" href="group___xE4_xBA_x8C_xE5_x8F_x89_xE6_xA0_x91.html">二叉树</a></div></div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
数据结构</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrblnk__root.html">rblnk_root</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">树根  <a href="structrblnk__root.html#_details">更多...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrblnk__info.html">rblnk_info</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">树信息表  <a href="structrblnk__info.html#_details">更多...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct____rblnk__node.html">__rblnk_node</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">红黑树节点  <a href="struct____rblnk__node.html#_details">更多...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
宏定义</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae745aa0b0431feab965f3085e9df84e4"></a><!-- doxytag: member="红黑树::RBLNK_RED" ref="gae745aa0b0431feab965f3085e9df84e4" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RBLNK_RED</b>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga9a2f81967b64bbde184dffabd4fcd1a2"></a><!-- doxytag: member="红黑树::RBLNK_BLACK" ref="ga9a2f81967b64bbde184dffabd4fcd1a2" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RBLNK_BLACK</b>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga670e6708b4a431512eda374f639810cb"></a><!-- doxytag: member="红黑树::RBLNK_MASK" ref="ga670e6708b4a431512eda374f639810cb" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RBLNK_MASK</b>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaaa8949a7bdda2793991e712c199486f8">RBLNK_ROOT</a>(name)&#160;&#160;&#160;<a class="el" href="structrblnk__root.html">rblnk_root</a> name = {NULL}</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">定义一个名为name的树根，并对其初始化  <a href="#gaaa8949a7bdda2793991e712c199486f8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga4889bf1e394402788acfc1a1de99be56">RBLNK_NODE</a>(name)&#160;&#160;&#160;<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> name = {0, NULL, NULL}</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">定义一个名为name的节点，并对其初始化  <a href="#ga4889bf1e394402788acfc1a1de99be56"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaaa24fda3c1fa1489183288f405261c3a">RBLNK_INFO</a>(name)&#160;&#160;&#160;<a class="el" href="structrblnk__info.html">rblnk_info</a> name = {0, 0, 0}</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">定义一个名为name的树信息表，并对其初始化  <a href="#gaaa24fda3c1fa1489183288f405261c3a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gabed6ad3d2a4042d6a2c382515eb95393"></a><!-- doxytag: member="红黑树::rblnk_inc" ref="gabed6ad3d2a4042d6a2c382515eb95393" args="(itr)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gabed6ad3d2a4042d6a2c382515eb95393">rblnk_inc</a>(itr)&#160;&#160;&#160;((itr) = rblnk_next(itr))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">迭代器递增 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga5eef1427f5a3b2719c945271d9daeab6"></a><!-- doxytag: member="红黑树::rblnk_dec" ref="ga5eef1427f5a3b2719c945271d9daeab6" args="(itr)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga5eef1427f5a3b2719c945271d9daeab6">rblnk_dec</a>(itr)&#160;&#160;&#160;((itr) = rblnk_prev(itr))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">迭代器递减 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8c62a05a3806b173f707611bdd76a1b0"></a><!-- doxytag: member="红黑树::rblnk_inc_later" ref="ga8c62a05a3806b173f707611bdd76a1b0" args="(itr)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga8c62a05a3806b173f707611bdd76a1b0">rblnk_inc_later</a>(itr)&#160;&#160;&#160;__rblnk_inc_later(itr, &amp;(itr))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">迭代器后自增 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga4565f33ce42fa4b1915ceb138646ba2c"></a><!-- doxytag: member="红黑树::rblnk_dec_later" ref="ga4565f33ce42fa4b1915ceb138646ba2c" args="(itr)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga4565f33ce42fa4b1915ceb138646ba2c">rblnk_dec_later</a>(itr)&#160;&#160;&#160;__rblnk_dec_later(itr, &amp;(itr))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">迭代器后自减 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga5b33334a44a642a1bf038efb405cd749">rblnk_foreach</a>(_begin, _end, fn, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">正向遍历_begin到_end的节点，并为每一个节点调用回调函数或宏  <a href="#ga5b33334a44a642a1bf038efb405cd749"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga0610f520cada9850c8f805072925983b">rblnk_reverse_foreach</a>(_rbegin, _rend, fn, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">逆向遍历_begin到_end的节点，并为每一个节点调用回调函数或宏  <a href="#ga0610f520cada9850c8f805072925983b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga709e8c44e4601a37834635c210548668">RBLNK_RECURSE_PROC</a>(name, type, param)&#160;&#160;&#160;void name(type * param)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">定义递归遍历回调函数  <a href="#ga709e8c44e4601a37834635c210548668"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga6df5839a68f52ca58b94baabc15d770e">rblnk_recurse_foreach</a>(root, fn, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">正向递归遍历整个树  <a href="#ga6df5839a68f52ca58b94baabc15d770e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga707fdda966662b8b02188fa4078931ba">rblnk_recurse_reverse_foreach</a>(root, fn, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">逆向递归遍历整个树  <a href="#ga707fdda966662b8b02188fa4078931ba"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga338edc24658c52267bcb1ee30527e165">rblnk_search</a>(root, newly, greater, res, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">搜索树中的某个节点  <a href="#ga338edc24658c52267bcb1ee30527e165"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gad12070580ff757a695a49faaa9c3cefb">rblnk_insert</a>(root, newly, greater, res, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">插入新节点  <a href="#gad12070580ff757a695a49faaa9c3cefb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gacaec0cfff7eb3001fe7b1d67b2d4fda0">rblnk_serialize</a>(root, buf, type, member)&#160;&#160;&#160;__rblnk_serialize(root, (void**)(buf), offset_of(type, member))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">将树进行序列化为一个有序序列  <a href="#gacaec0cfff7eb3001fe7b1d67b2d4fda0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaa3905e4e6ba16c931fe97b3e43384360">rblnk_deserialize</a>(root, buf, cnt, type, member)&#160;&#160;&#160;__rblnk_deserialize(root, (void**)(buf), cnt, offset_of(type, member))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">根据树的序列进行反序列化为一个完整的树  <a href="#gaa3905e4e6ba16c931fe97b3e43384360"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
类型定义</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga7417aa626d7a0f898b5338b97411d546"></a><!-- doxytag: member="红黑树::rblnk_pr1" ref="ga7417aa626d7a0f898b5338b97411d546" args=")(rblnk_node *)" -->
typedef int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga7417aa626d7a0f898b5338b97411d546">rblnk_pr1</a> )(<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">单参数回调函数指针 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gad5fcd22dbb5992d65297e5663cb81d36"></a><!-- doxytag: member="红黑树::rblnk_pr2" ref="gad5fcd22dbb5992d65297e5663cb81d36" args=")(rblnk_node *, rblnk_node *)" -->
typedef int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gad5fcd22dbb5992d65297e5663cb81d36">rblnk_pr2</a> )(<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">双参数回调函数指针 <br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
函数</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga7871f46c39842fab09b365dd88ac5cac">intrin_align</a> (2) <a class="el" href="struct____rblnk__node.html">__rblnk_node</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga6fb9e1cd4db306f16e55518361f0ab84">rblnk_count</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">获取树的节点总数  <a href="#ga6fb9e1cd4db306f16e55518361f0ab84"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga8d93bfeca0ce469728f2b4c735ce106a">rblnk_distance</a> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> first, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> last)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">计算两个节点的迭代距离  <a href="#ga8d93bfeca0ce469728f2b4c735ce106a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga1de1ae60df6b6cfa2a6db141b00cc636">rblnk_index_of</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> itr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">计算迭代器的正向索引  <a href="#ga1de1ae60df6b6cfa2a6db141b00cc636"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga29756a41c72f28650f4469334f43c015">rblnk_reverse_index_of</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> itr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">计算迭代器的逆向索引  <a href="#ga29756a41c72f28650f4469334f43c015"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gacb852328ee3aacfe2e550c4b54b9949f">rblnk_depth</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">计算树的深度  <a href="#gacb852328ee3aacfe2e550c4b54b9949f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gacae9fbde870cca412c6f6faee36ec142">rblnk_leafs</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">计算树的叶子数  <a href="#gacae9fbde870cca412c6f6faee36ec142"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga3bf7056c3e0714a8e6aae9e91ce7e01e">rblnk_get_info</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root, <a class="el" href="structrblnk__info.html">rblnk_info</a> *info)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">获取树的信息，包括节点数、深度、叶子数  <a href="#ga3bf7056c3e0714a8e6aae9e91ce7e01e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gade0f9a8b187659eb069ba5db9d8af195">rblnk_coloring</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *node, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *parent)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">插入节点后，对树进行着色调整  <a href="#gade0f9a8b187659eb069ba5db9d8af195"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga451886a62143e4743fafb5b86a5b2a28">rblnk_erase</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *entry)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">移除某个节点  <a href="#ga451886a62143e4743fafb5b86a5b2a28"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaa931c3dedfb8e0f288017fbf7a03b6b8">rblnk_erases</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> begin, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> end, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga7417aa626d7a0f898b5338b97411d546">rblnk_pr1</a> erase_handler)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">移除区域内的节点  <a href="#gaa931c3dedfb8e0f288017fbf7a03b6b8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga92211938608f69651c45516f2c85b663">rblnk_init</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化树根  <a href="#ga92211938608f69651c45516f2c85b663"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga7d050dc86491d48acbf588f40a48900f">rblnk_empty</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断树是否为空  <a href="#ga7d050dc86491d48acbf588f40a48900f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga47a9b1ad06550c96653e53629a4ebe57"></a><!-- doxytag: member="红黑树::__rblnk_singular" ref="ga47a9b1ad06550c96653e53629a4ebe57" args="(rblnk_node *root)" -->
static int&#160;</td><td class="memItemRight" valign="bottom"><b>__rblnk_singular</b> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *root)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaab20c46c2eb38254803490536bbc36ac">rblnk_singular</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断树是否只有单个节点  <a href="#gaab20c46c2eb38254803490536bbc36ac"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga65fe4fdebdda77a66bb5b26d4c3c2910">rblnk_serialable</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断树是否可以序列化  <a href="#ga65fe4fdebdda77a66bb5b26d4c3c2910"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gac7e13ffecf675371e361a25d258be3e7">rblnk_left</a> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到左子节点  <a href="#gac7e13ffecf675371e361a25d258be3e7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gabf511bf9afe0448fc2ea1a9feaf77935">rblnk_right</a> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到右子节点  <a href="#gabf511bf9afe0448fc2ea1a9feaf77935"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gac9b28b4b852f74baf30eda817e2144b1">rblnk_parent</a> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到父节点  <a href="#gac9b28b4b852f74baf30eda817e2144b1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static uintptr_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga6abde00d596cf397ea6ccc5e5724f1e0">rblnk_color</a> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到节点的颜色值  <a href="#ga6abde00d596cf397ea6ccc5e5724f1e0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga7f6bea5de9fffaed975df98753c20bed">rblnk_red</a> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断节点是否是红色的  <a href="#ga7f6bea5de9fffaed975df98753c20bed"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga6e91c6985df0a43de84afc2c55d47c04">rblnk_black</a> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断节点是否是黑色的  <a href="#ga6e91c6985df0a43de84afc2c55d47c04"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga40cf982b1d6c159daa42defa32844502">rblnk_is_root</a> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> itr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断当前节点是否是根节点  <a href="#ga40cf982b1d6c159daa42defa32844502"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga3acf0e85dbc729b064ccc9d696b194d4">rblnk_is_leaf</a> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> itr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断当前节点是否是叶子节点  <a href="#ga3acf0e85dbc729b064ccc9d696b194d4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gada1dad989f8a0d4cc3d49fefdfbf04fc">rblnk_link</a> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> newly, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> parent, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> *plink)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">链接两个节点  <a href="#gada1dad989f8a0d4cc3d49fefdfbf04fc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga3943690f21dc9dee488c35313f7d093f">rblnk_set_red</a> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">设置当前节点的颜色为红色  <a href="#ga3943690f21dc9dee488c35313f7d093f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga700dde2e01a11e733893be4dccaca0c6">rblnk_set_black</a> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">设置当前节点的颜色为黑色  <a href="#ga700dde2e01a11e733893be4dccaca0c6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gab43d3dd00f5f9797f2e6728804388546">rblnk_set_color</a> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *node, uintptr_t color)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">设置当前节点的颜色  <a href="#gab43d3dd00f5f9797f2e6728804388546"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga6f05bc6d011c149bc85e3667240a6f27">rblnk_set_parent</a> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *node, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *parent)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">设置当前节点的父节点  <a href="#ga6f05bc6d011c149bc85e3667240a6f27"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga5474c6caddd6bdba98f8e126d411d580">rblnk_set_parent_if</a> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *node, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *parent)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">仅在node不为空时，设置node的父节点  <a href="#ga5474c6caddd6bdba98f8e126d411d580"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga53c43d6dc5b3cb6ab7a416fae7c5f80a">rblnk_set_parent_color</a> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *node, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *parent, uintptr_t color)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">同时设置节点的父节点和颜色值  <a href="#ga53c43d6dc5b3cb6ab7a416fae7c5f80a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga553fbabdc6b8bfa429d2a8dd41be744c">rblnk_node_init</a> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *node)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化节点  <a href="#ga553fbabdc6b8bfa429d2a8dd41be744c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gadfe6e5c9ffa167c1536634f45c9ff8ce">rblnk_iter_replace</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> victim, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> newly)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">用新节点替换旧节点  <a href="#gadfe6e5c9ffa167c1536634f45c9ff8ce"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga786e6ac4f90eaed9db8547e2c2a20b72">rblnk_replace</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *victim, <a class="el" href="structrblnk__root.html">rblnk_root</a> *newly)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">用新的树根替换旧树根  <a href="#ga786e6ac4f90eaed9db8547e2c2a20b72"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga9dacf7edeb485b8997ff6cac7846a0c5">rblnk_swap</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *a, <a class="el" href="structrblnk__root.html">rblnk_root</a> *b)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">交换两个树  <a href="#ga9dacf7edeb485b8997ff6cac7846a0c5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga43f9873a6ad90b95af037efd8b715313">rblnk_exist</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> itr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断一个节点是否存在于树中  <a href="#ga43f9873a6ad90b95af037efd8b715313"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga282ecc18962ddc54b578df7044dc9de9">rblnk_at</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root, size_t index)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到正向索引对应的节点的迭代器  <a href="#ga282ecc18962ddc54b578df7044dc9de9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf747daec306db3fdfaa6653558ce2062">rblnk_reverse_at</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root, size_t index)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到逆向索引对应的节点的迭代器  <a href="#gaf747daec306db3fdfaa6653558ce2062"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gab434b46c3cb032b3114a0c292ee50c52">rblnk_front</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到树的最左端节点  <a href="#gab434b46c3cb032b3114a0c292ee50c52"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga78d61eaa02e5a1af07b2da867776fd53">rblnk_back</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到树的最右端节点  <a href="#ga78d61eaa02e5a1af07b2da867776fd53"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gad090e3e5ab9b4f09b94e968233554a6b">rblnk_begin</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到指向正向起始位置的迭代器  <a href="#gad090e3e5ab9b4f09b94e968233554a6b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gac850e7c259076759a9a8d5fde09e2104">rblnk_end</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到指向正向终止位置的迭代器  <a href="#gac850e7c259076759a9a8d5fde09e2104"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga9af3a349f64b4e1476c529187f24d4bd">rblnk_end_of</a> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> cur)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到当前迭代器的正向终止位置  <a href="#ga9af3a349f64b4e1476c529187f24d4bd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gae58917b51be46e3525e90954cd3ab664">rblnk_rbegin</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到指向逆向起始位置的迭代器  <a href="#gae58917b51be46e3525e90954cd3ab664"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga34d7b697a7bff2a1a90796e9c384f293">rblnk_rend</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到指向逆向终止位置的迭代器  <a href="#ga34d7b697a7bff2a1a90796e9c384f293"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaa826e37d560cfadd9527078b7541a8d5">rblnk_rend_of</a> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> cur)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到当前迭代器的逆向终止位置  <a href="#gaa826e37d560cfadd9527078b7541a8d5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga724a069a61ec122e5a22a515eb6fc1ab">rblnk_next</a> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> cur)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到当前节点的中序后继节点  <a href="#ga724a069a61ec122e5a22a515eb6fc1ab"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf2372e7e19baf6c5fc1c2d1e46bcda2a">rblnk_prev</a> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> cur)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到当前节点的中序前驱节点  <a href="#gaf2372e7e19baf6c5fc1c2d1e46bcda2a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gae9ac9b2b5c33a92e0306a09346ef32cc">rblnk_advance</a> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> cur, int dist)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">给迭代器增加一段距离或减小一段距离  <a href="#gae9ac9b2b5c33a92e0306a09346ef32cc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga7b860940aefd704957bb73e2a56a1584">rblnk_clear</a> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga7417aa626d7a0f898b5338b97411d546">rblnk_pr1</a> erase_handler)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">清空树  <a href="#ga7b860940aefd704957bb73e2a56a1584"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga1d18837924379fa2a53d666aabbf865f"></a><!-- doxytag: member="红黑树::__rblnk_inc_later" ref="ga1d18837924379fa2a53d666aabbf865f" args="(rblnk_iter cur, rblnk_iter *p)" -->
static <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><b>__rblnk_inc_later</b> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> cur, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> *p)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga720881736f62ddcf7160346b72289f61"></a><!-- doxytag: member="红黑树::__rblnk_dec_later" ref="ga720881736f62ddcf7160346b72289f61" args="(rblnk_iter cur, rblnk_iter *p)" -->
static <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><b>__rblnk_dec_later</b> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> cur, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> *p)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gab45f718c0f1e1410b8f33f9c90a374b2"></a><!-- doxytag: member="红黑树::__do_rblnk_recurse_foreach" ref="gab45f718c0f1e1410b8f33f9c90a374b2" args="(rblnk_iter cur, void(*fn)(void *), size_t offset)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__do_rblnk_recurse_foreach</b> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> cur, void(*fn)(void *), size_t offset)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8179bdfb7e6a453c7139f996d74974b2"></a><!-- doxytag: member="红黑树::__do_rblnk_recurse_reverse_foreach" ref="ga8179bdfb7e6a453c7139f996d74974b2" args="(rblnk_iter cur, void(*fn)(void *), size_t offset)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__do_rblnk_recurse_reverse_foreach</b> (<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> cur, void(*fn)(void *), size_t offset)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae66a0bd5ddce6f134c4d54c9b0868cae"></a><!-- doxytag: member="红黑树::__rblnk_recurse_foreach" ref="gae66a0bd5ddce6f134c4d54c9b0868cae" args="(rblnk_root *root, void(*fn)(void *), size_t offset)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><b>__rblnk_recurse_foreach</b> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root, void(*fn)(void *), size_t offset)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga977586fd382ccb785e9404a3665b08dd"></a><!-- doxytag: member="红黑树::__rblnk_recurse_reverse_foreach" ref="ga977586fd382ccb785e9404a3665b08dd" args="(rblnk_root *root, void(*fn)(void *), size_t offset)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><b>__rblnk_recurse_reverse_foreach</b> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root, void(*fn)(void *), size_t offset)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga546896c29a175cd8ced83882a8dd2327"></a><!-- doxytag: member="红黑树::__rblnk_serialize" ref="ga546896c29a175cd8ced83882a8dd2327" args="(rblnk_root *root, void **buf, size_t offset)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__rblnk_serialize</b> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root, void **buf, size_t offset)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gadb551f3a15cf521487f8d21f8a2942f7"></a><!-- doxytag: member="红黑树::__rblnk_deserialize" ref="gadb551f3a15cf521487f8d21f8a2942f7" args="(rblnk_root *root, void **buf, size_t cnt, size_t offset)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__rblnk_deserialize</b> (<a class="el" href="structrblnk__root.html">rblnk_root</a> *root, void **buf, size_t cnt, size_t offset)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
变量</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf7a22577e5f8f2d8c3ab96f378465658"></a><!-- doxytag: member="红黑树::rblnk_node" ref="gaf7a22577e5f8f2d8c3ab96f378465658" args="" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">节点 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga588a122bb585e30d2dbc7ef1e6cb0297"></a><!-- doxytag: member="红黑树::rblnk_iter" ref="ga588a122bb585e30d2dbc7ef1e6cb0297" args="" -->
*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">迭代器 <br/></td></tr>
</table>
<hr/><h2>宏定义文档</h2>
<a class="anchor" id="gaaa8949a7bdda2793991e712c199486f8"></a><!-- doxytag: member="rblnk.h::RBLNK_ROOT" ref="gaaa8949a7bdda2793991e712c199486f8" args="(name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RBLNK_ROOT</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">name</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="structrblnk__root.html">rblnk_root</a> name = {NULL}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>定义一个名为name的树根，并对其初始化 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>树根名称 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00092">92</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga4889bf1e394402788acfc1a1de99be56"></a><!-- doxytag: member="rblnk.h::RBLNK_NODE" ref="ga4889bf1e394402788acfc1a1de99be56" args="(name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RBLNK_NODE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">name</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> name = {0, NULL, NULL}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>定义一个名为name的节点，并对其初始化 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>节点名称 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00093">93</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaaa24fda3c1fa1489183288f405261c3a"></a><!-- doxytag: member="rblnk.h::RBLNK_INFO" ref="gaaa24fda3c1fa1489183288f405261c3a" args="(name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RBLNK_INFO</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">name</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="structrblnk__info.html">rblnk_info</a> name = {0, 0, 0}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>定义一个名为name的树信息表，并对其初始化 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>名称 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00094">94</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga5b33334a44a642a1bf038efb405cd749"></a><!-- doxytag: member="rblnk.h::rblnk_foreach" ref="ga5b33334a44a642a1bf038efb405cd749" args="(_begin, _end, fn, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define rblnk_foreach</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_begin, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_end, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">fn, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> {\
        <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297" title="迭代器">rblnk_iter</a> _q_e = (_end);                           \
        <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297" title="迭代器">rblnk_iter</a> _q_f = (_begin);                         \
        <span class="keywordflow">while</span> (_q_f != _q_e) {                              \
            type * _q_t = container_of(_q_f, type, member); \
            <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gabed6ad3d2a4042d6a2c382515eb95393" title="迭代器递增">rblnk_inc</a>(_q_f);                                \
            fn(_q_t);                                       \
        }                                                   \
    } <span class="keywordflow">while</span> (0)
</pre></div>
<p>正向遍历_begin到_end的节点，并为每一个节点调用回调函数或宏 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">_begin</td><td>起始位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">_end</td><td>终止位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fn</td><td>回调函数或宏 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00798">798</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga0610f520cada9850c8f805072925983b"></a><!-- doxytag: member="rblnk.h::rblnk_reverse_foreach" ref="ga0610f520cada9850c8f805072925983b" args="(_rbegin, _rend, fn, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define rblnk_reverse_foreach</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_rbegin, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_rend, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">fn, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> {\
        <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297" title="迭代器">rblnk_iter</a> _q_e = (_rend);                          \
        <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297" title="迭代器">rblnk_iter</a> _q_f = (_rbegin);                        \
        <span class="keywordflow">while</span> (_q_f != _q_e) {                              \
            type * _q_t = container_of(_q_f, type, member); \
            <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga5eef1427f5a3b2719c945271d9daeab6" title="迭代器递减">rblnk_dec</a>(_q_f);                                \
            fn(_q_t);                                       \
        }                                                   \
    } <span class="keywordflow">while</span> (0)
</pre></div>
<p>逆向遍历_begin到_end的节点，并为每一个节点调用回调函数或宏 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">_rbegin</td><td>逆向起始位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">_rend</td><td>逆向终止位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fn</td><td>回调函数或宏 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00817">817</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga709e8c44e4601a37834635c210548668"></a><!-- doxytag: member="rblnk.h::RBLNK_RECURSE_PROC" ref="ga709e8c44e4601a37834635c210548668" args="(name, type, param)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RBLNK_RECURSE_PROC</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">name, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">param&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;void name(type * param)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>定义递归遍历回调函数 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>函数名 </td></tr>
    <tr><td class="paramname">type</td><td>节点拥有者类型 </td></tr>
    <tr><td class="paramname">param</td><td>参数名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga6df5839a68f52ca58b94baabc15d770e" title="正向递归遍历整个树">rblnk_recurse_foreach</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga707fdda966662b8b02188fa4078931ba" title="逆向递归遍历整个树">rblnk_recurse_reverse_foreach</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00855">855</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga6df5839a68f52ca58b94baabc15d770e"></a><!-- doxytag: member="rblnk.h::rblnk_recurse_foreach" ref="ga6df5839a68f52ca58b94baabc15d770e" args="(root, fn, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define rblnk_recurse_foreach</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">root, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">fn, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment">__rblnk_recurse_foreach(root, (<span class="keywordtype">void</span> (*)(<span class="keywordtype">void</span>*))(fn), \
            offset_of(type, member))
</pre></div>
<p>正向递归遍历整个树 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fn</td><td>回调函数或宏 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga709e8c44e4601a37834635c210548668" title="定义递归遍历回调函数">RBLNK_RECURSE_PROC</a>(PrintNode, DATA, node)
    {
        printf(<span class="stringliteral">&quot;%3d &quot;</span>, node-&gt;data);
    }

    <span class="comment">// 打印整个树</span>
    <span class="keywordtype">void</span> PrintAVLTree(<a class="code" href="structrblnk__root.html" title="树根">rblnk_root</a>* root)
    {
        <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga6df5839a68f52ca58b94baabc15d770e" title="正向递归遍历整个树">rblnk_recurse_foreach</a>(root, PrintNode, DATA, node);
        putchar(<span class="charliteral">&#39;\n&#39;</span>);
    }
</pre></div> </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga707fdda966662b8b02188fa4078931ba" title="逆向递归遍历整个树">rblnk_recurse_reverse_foreach</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga709e8c44e4601a37834635c210548668" title="定义递归遍历回调函数">RBLNK_RECURSE_PROC</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00880">880</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga707fdda966662b8b02188fa4078931ba"></a><!-- doxytag: member="rblnk.h::rblnk_recurse_reverse_foreach" ref="ga707fdda966662b8b02188fa4078931ba" args="(root, fn, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define rblnk_recurse_reverse_foreach</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">root, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">fn, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment">__rblnk_recurse_reverse_foreach(root, (<span class="keywordtype">void</span> (*)(<span class="keywordtype">void</span>*))(fn), \
            offset_of(type, member))
</pre></div>
<p>逆向递归遍历整个树 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fn</td><td>回调函数或宏 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga6df5839a68f52ca58b94baabc15d770e" title="正向递归遍历整个树">rblnk_recurse_foreach</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga709e8c44e4601a37834635c210548668" title="定义递归遍历回调函数">RBLNK_RECURSE_PROC</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00893">893</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga338edc24658c52267bcb1ee30527e165"></a><!-- doxytag: member="rblnk.h::rblnk_search" ref="ga338edc24658c52267bcb1ee30527e165" args="(root, newly, greater, res, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define rblnk_search</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">root, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">newly, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">greater, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">res, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> {\
        <a class="code" href="structrblnk__root.html" title="树根">rblnk_root</a>* _k_r = (root);                              \
        type * _k_pn = (newly);                                 \
        <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297" title="迭代器">rblnk_iter</a> _k_p = _k_r-&gt;node;                           \
        (res) = NULL;                                           \
        <span class="keywordflow">while</span> (_k_p) {                                          \
            type * _k_pr = container_of(_k_p, type, member);    \
            <span class="keywordflow">if</span> (greater(_k_pr, _k_pn))                          \
                _k_p = _k_p-&gt;left;                              \
            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (greater(_k_pn, _k_pr))                     \
                _k_p = _k_p-&gt;right;                             \
            <span class="keywordflow">else</span> {                                              \
                (res) = _k_p; <span class="keywordflow">break</span>;                            \
            }                                                   \
        }                                                       \
    } <span class="keywordflow">while</span> (0)
</pre></div>
<p>搜索树中的某个节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">newly</td><td>用于搜索的临时节点，类型是type，该节点使用与搜索的值相同的值 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">greater</td><td>比较函数或宏。 升序:(i-&gt;data &gt; j-&gt;data) 降序:(i-&gt;data &lt; j-&gt;data) </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">res</td><td>返回值。返回目标节点，若为NULL表示找不到节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297" title="迭代器">rblnk_iter</a> node_15;
    DATA* p = (DATA*)malloc(<span class="keyword">sizeof</span>(DATA));
    <span class="keywordflow">if</span> (!p)
        <span class="keywordflow">return</span> NULL;

    p-&gt;data = 15;

    <span class="comment">//查找值为15的节点</span>
    <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga338edc24658c52267bcb1ee30527e165" title="搜索树中的某个节点">rblnk_search</a>(&amp;root, p, DATA_Greater, node_15, DATA, node);
    <span class="keywordflow">if</span> (!node_15)
        <span class="keywordflow">return</span> NULL;

    <span class="keywordflow">return</span> node_15;
</pre></div> </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00925">925</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gad12070580ff757a695a49faaa9c3cefb"></a><!-- doxytag: member="rblnk.h::rblnk_insert" ref="gad12070580ff757a695a49faaa9c3cefb" args="(root, newly, greater, res, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define rblnk_insert</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">root, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">newly, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">greater, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">res, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> {\
        <a class="code" href="structrblnk__root.html" title="树根">rblnk_root</a>* _k_r = (root);                                      \
        <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297" title="迭代器">rblnk_iter</a>* _k_pp = &amp;_k_r-&gt;node;                                \
        <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297" title="迭代器">rblnk_iter</a> _k_n = (newly);                                      \
        <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297" title="迭代器">rblnk_iter</a> _k_p;                                                \
        type * _k_pn = container_of(_k_n, type, member);                \
        (res) = 1;                                                      \
        <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga553fbabdc6b8bfa429d2a8dd41be744c" title="初始化节点">rblnk_node_init</a>(_k_n);                                          \
        <span class="keywordflow">while</span> (*_k_pp) {                                                \
            type * _k_pr = container_of(_k_p = *_k_pp, type, member);   \
            <span class="keywordflow">if</span> (greater(_k_pr, _k_pn))                                  \
                _k_pp = &amp;_k_p-&gt;left;                                    \
            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (greater(_k_pn, _k_pr))                             \
                _k_pp = &amp;_k_p-&gt;right;                                   \
            <span class="keywordflow">else</span> {                                                      \
                (res) = 0; <span class="keywordflow">break</span>;                                       \
            }                                                           \
        }                                                               \
        <span class="keywordflow">if</span> (res) {                                                      \
            <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gada1dad989f8a0d4cc3d49fefdfbf04fc" title="链接两个节点">rblnk_link</a>(_k_n, _k_p, _k_pp);                              \
            <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gade0f9a8b187659eb069ba5db9d8af195" title="插入节点后，对树进行着色调整">rblnk_coloring</a>(_k_r, _k_n, _k_p);                           \
        }                                                               \
    } <span class="keywordflow">while</span> (0)
</pre></div>
<p>插入新节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">newly</td><td>新节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">greater</td><td>比较函数或宏。 升序:(i-&gt;data &gt; j-&gt;data) 降序:(i-&gt;data &lt; j-&gt;data) </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">res</td><td>返回值。返回1表示成功；若为0表示节点有冲突，无法插入 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="keywordtype">int</span> ret;
    DATA* p = (DATA*)malloc(<span class="keyword">sizeof</span>(DATA));
    <span class="keywordflow">if</span> (!p)
        <span class="keywordflow">return</span> 0;

    p-&gt;data = 88;

    <span class="comment">//插入值为88的节点</span>
    <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gad12070580ff757a695a49faaa9c3cefb" title="插入新节点">rblnk_insert</a>(&amp;root, &amp;p-&gt;node, DATA_Greater, ret, DATA, node);
    <span class="keywordflow">if</span> (!ret)
        <span class="keywordflow">return</span> 0;

    <span class="keywordflow">return</span> 1;
</pre></div> </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00970">970</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gacaec0cfff7eb3001fe7b1d67b2d4fda0"></a><!-- doxytag: member="rblnk.h::rblnk_serialize" ref="gacaec0cfff7eb3001fe7b1d67b2d4fda0" args="(root, buf, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define rblnk_serialize</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">root, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">buf, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;__rblnk_serialize(root, (void**)(buf), offset_of(type, member))</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>将树进行序列化为一个有序序列 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>序列缓存，元素类型为type指针类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaa3905e4e6ba16c931fe97b3e43384360" title="根据树的序列进行反序列化为一个完整的树">rblnk_deserialize</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga65fe4fdebdda77a66bb5b26d4c3c2910" title="判断树是否可以序列化">rblnk_serialable</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l01008">1008</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaa3905e4e6ba16c931fe97b3e43384360"></a><!-- doxytag: member="rblnk.h::rblnk_deserialize" ref="gaa3905e4e6ba16c931fe97b3e43384360" args="(root, buf, cnt, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define rblnk_deserialize</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">root, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">buf, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">cnt, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;__rblnk_deserialize(root, (void**)(buf), cnt, offset_of(type, member))</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>根据树的序列进行反序列化为一个完整的树 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">buf</td><td>序列缓存，元素类型为type指针类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cnt</td><td>序列长度(元素数) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gacaec0cfff7eb3001fe7b1d67b2d4fda0" title="将树进行序列化为一个有序序列">rblnk_serialize</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga65fe4fdebdda77a66bb5b26d4c3c2910" title="判断树是否可以序列化">rblnk_serialable</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l01021">1021</a>行定义。</p>

</div>
</div>
<hr/><h2>函数文档</h2>
<a class="anchor" id="ga7871f46c39842fab09b365dd88ac5cac"></a><!-- doxytag: member="rblnk.h::intrin_align" ref="ga7871f46c39842fab09b365dd88ac5cac" args="(2) __rblnk_node" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct intrin_align </td>
          <td>(</td>
          <td class="paramtype">2&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><p>父节点和颜色值</p>
<p>左子节点</p>
<p>右子节点 </p>
</p>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00043">43</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga6fb9e1cd4db306f16e55518361f0ab84"></a><!-- doxytag: member="rblnk.h::rblnk_count" ref="ga6fb9e1cd4db306f16e55518361f0ab84" args="(rblnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API size_t rblnk_count </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>获取树的节点总数 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>size_t 返回节点数 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga3bf7056c3e0714a8e6aae9e91ce7e01e" title="获取树的信息，包括节点数、深度、叶子数">rblnk_get_info</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8c_source.html">rblnk.c</a>第<a class="el" href="rblnk_8c_source.html#l00538">538</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga8d93bfeca0ce469728f2b4c735ce106a"></a><!-- doxytag: member="rblnk.h::rblnk_distance" ref="ga8d93bfeca0ce469728f2b4c735ce106a" args="(rblnk_iter first, rblnk_iter last)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API size_t rblnk_distance </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td>
          <td class="paramname"><em>first</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td>
          <td class="paramname"><em>last</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>计算两个节点的迭代距离 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">first</td><td>首节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">last</td><td>尾节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>以索引为例，2到4的距离是4 (4-2+1=3) </dd></dl>
<dl class="return"><dt><b>返回:</b></dt><dd>size_t 返回距离 </dd></dl>

<p>在文件<a class="el" href="rblnk_8c_source.html">rblnk.c</a>第<a class="el" href="rblnk_8c_source.html#l00551">551</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga1de1ae60df6b6cfa2a6db141b00cc636"></a><!-- doxytag: member="rblnk.h::rblnk_index_of" ref="ga1de1ae60df6b6cfa2a6db141b00cc636" args="(rblnk_root *root, rblnk_iter itr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API size_t rblnk_index_of </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td>
          <td class="paramname"><em>itr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>计算迭代器的正向索引 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>迭代器 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>size_t 返回索引 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga29756a41c72f28650f4469334f43c015" title="计算迭代器的逆向索引">rblnk_reverse_index_of</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8c_source.html">rblnk.c</a>第<a class="el" href="rblnk_8c_source.html#l00563">563</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga29756a41c72f28650f4469334f43c015"></a><!-- doxytag: member="rblnk.h::rblnk_reverse_index_of" ref="ga29756a41c72f28650f4469334f43c015" args="(rblnk_root *root, rblnk_iter itr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API size_t rblnk_reverse_index_of </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td>
          <td class="paramname"><em>itr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>计算迭代器的逆向索引 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>迭代器 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>size_t 返回索引 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga1de1ae60df6b6cfa2a6db141b00cc636" title="计算迭代器的正向索引">rblnk_index_of</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8c_source.html">rblnk.c</a>第<a class="el" href="rblnk_8c_source.html#l00576">576</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gacb852328ee3aacfe2e550c4b54b9949f"></a><!-- doxytag: member="rblnk.h::rblnk_depth" ref="gacb852328ee3aacfe2e550c4b54b9949f" args="(rblnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API size_t rblnk_depth </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>计算树的深度 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>size_t 返回深度 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga3bf7056c3e0714a8e6aae9e91ce7e01e" title="获取树的信息，包括节点数、深度、叶子数">rblnk_get_info</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8c_source.html">rblnk.c</a>第<a class="el" href="rblnk_8c_source.html#l00421">421</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gacae9fbde870cca412c6f6faee36ec142"></a><!-- doxytag: member="rblnk.h::rblnk_leafs" ref="gacae9fbde870cca412c6f6faee36ec142" args="(rblnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API size_t rblnk_leafs </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>计算树的叶子数 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>size_t 返回叶子数 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga3bf7056c3e0714a8e6aae9e91ce7e01e" title="获取树的信息，包括节点数、深度、叶子数">rblnk_get_info</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8c_source.html">rblnk.c</a>第<a class="el" href="rblnk_8c_source.html#l00462">462</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga3bf7056c3e0714a8e6aae9e91ce7e01e"></a><!-- doxytag: member="rblnk.h::rblnk_get_info" ref="ga3bf7056c3e0714a8e6aae9e91ce7e01e" args="(rblnk_root *root, rblnk_info *info)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API void rblnk_get_info </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structrblnk__info.html">rblnk_info</a> *&#160;</td>
          <td class="paramname"><em>info</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>获取树的信息，包括节点数、深度、叶子数 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">info</td><td>保存信息的结构体 </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga6fb9e1cd4db306f16e55518361f0ab84" title="获取树的节点总数">rblnk_count</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gacb852328ee3aacfe2e550c4b54b9949f" title="计算树的深度">rblnk_depth</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gacae9fbde870cca412c6f6faee36ec142" title="计算树的叶子数">rblnk_leafs</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8c_source.html">rblnk.c</a>第<a class="el" href="rblnk_8c_source.html#l00489">489</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gade0f9a8b187659eb069ba5db9d8af195"></a><!-- doxytag: member="rblnk.h::rblnk_coloring" ref="gade0f9a8b187659eb069ba5db9d8af195" args="(rblnk_root *root, rblnk_node *node, rblnk_node *parent)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API void rblnk_coloring </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *&#160;</td>
          <td class="paramname"><em>parent</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>插入节点后，对树进行着色调整 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">node</td><td>目标节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">parent</td><td>node的父节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>常用于节点插入，在rblnk_link之后调用 </dd></dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="keywordtype">int</span> insert_node(<a class="code" href="structrblnk__root.html" title="树根">rblnk_root</a>* root, DATA* newly)
    {
        DATA* pdat;
        <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297" title="迭代器">rblnk_iter</a> cur;
        <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297" title="迭代器">rblnk_iter</a>* p = &amp;root-&gt;node;
        
        <span class="comment">// 初始化新节点</span>
        <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga553fbabdc6b8bfa429d2a8dd41be744c" title="初始化节点">rblnk_node_init</a>(&amp;newly-&gt;node);
        
        <span class="keywordflow">while</span> (*p) {
            cur = *p;
            pdat = container_of(cur, DATA, node);
            <span class="keywordflow">if</span> (pdat-&gt;data &gt; newly-&gt;data)
                p = &amp;cur-&gt;left;
            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pdat-&gt;data &lt; newly-&gt;data)
                p = &amp;cur-&gt;right;
            <span class="keywordflow">else</span> {
                <span class="comment">// 有相同值的节点，无法插入</span>
                <span class="keywordflow">return</span> 0;
            }
        }
        
        <span class="comment">// 链接新节点到树中</span>
        <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gada1dad989f8a0d4cc3d49fefdfbf04fc" title="链接两个节点">rblnk_link</a>(&amp;newly-&gt;node, cur, p);
        
        <span class="comment">// 着色调整</span>
        <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gade0f9a8b187659eb069ba5db9d8af195" title="插入节点后，对树进行着色调整">rblnk_coloring</a>(root, &amp;newly-&gt;node, cur);

        <span class="keywordflow">return</span> 1;
    }
</pre></div> </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gad12070580ff757a695a49faaa9c3cefb" title="插入新节点">rblnk_insert</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gada1dad989f8a0d4cc3d49fefdfbf04fc" title="链接两个节点">rblnk_link</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8c_source.html">rblnk.c</a>第<a class="el" href="rblnk_8c_source.html#l00079">79</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga451886a62143e4743fafb5b86a5b2a28"></a><!-- doxytag: member="rblnk.h::rblnk_erase" ref="ga451886a62143e4743fafb5b86a5b2a28" args="(rblnk_root *root, rblnk_node *entry)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API void rblnk_erase </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *&#160;</td>
          <td class="paramname"><em>entry</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>移除某个节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">entry</td><td>待移除节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="rblnk_8c_source.html">rblnk.c</a>第<a class="el" href="rblnk_8c_source.html#l00250">250</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaa931c3dedfb8e0f288017fbf7a03b6b8"></a><!-- doxytag: member="rblnk.h::rblnk_erases" ref="gaa931c3dedfb8e0f288017fbf7a03b6b8" args="(rblnk_root *root, rblnk_iter begin, rblnk_iter end, rblnk_pr1 erase_handler)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API void rblnk_erases </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td>
          <td class="paramname"><em>begin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td>
          <td class="paramname"><em>end</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga7417aa626d7a0f898b5338b97411d546">rblnk_pr1</a>&#160;</td>
          <td class="paramname"><em>erase_handler</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>移除区域内的节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">root</td><td>树根</td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">begin</td><td>起始位置 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">end</td><td>终止位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">erase_handler</td><td>移除响应函数，通常用于监视和释放节点，可以传递NULL, 表示不为删除的节点调用响应来处理 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>函数会为每一个被移除的节点调用erase_handler来处理节点 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga7b860940aefd704957bb73e2a56a1584" title="清空树">rblnk_clear</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8c_source.html">rblnk.c</a>第<a class="el" href="rblnk_8c_source.html#l00311">311</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga92211938608f69651c45516f2c85b663"></a><!-- doxytag: member="rblnk.h::rblnk_init" ref="ga92211938608f69651c45516f2c85b663" args="(rblnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void rblnk_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>初始化树根 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">root</td><td>目标树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <a class="code" href="structrblnk__root.html" title="树根">rblnk_root</a> r;
    <span class="comment">// 初始化</span>
    <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga92211938608f69651c45516f2c85b663" title="初始化树根">rblnk_init</a>(&amp;r);
</pre></div> </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00252">252</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga7d050dc86491d48acbf588f40a48900f"></a><!-- doxytag: member="rblnk.h::rblnk_empty" ref="ga7d050dc86491d48acbf588f40a48900f" args="(rblnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int rblnk_empty </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断树是否为空 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>真 </td></tr>
    <tr><td class="paramname">0</td><td>假 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="keywordflow">if</span> (!<a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga7d050dc86491d48acbf588f40a48900f" title="判断树是否为空">rblnk_empty</a>(&amp;r)) {
        ......
    }
</pre></div> </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00271">271</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaab20c46c2eb38254803490536bbc36ac"></a><!-- doxytag: member="rblnk.h::rblnk_singular" ref="gaab20c46c2eb38254803490536bbc36ac" args="(rblnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int rblnk_singular </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断树是否只有单个节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>真 </td></tr>
    <tr><td class="paramname">0</td><td>假 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="keywordflow">if</span> (<a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaab20c46c2eb38254803490536bbc36ac" title="判断树是否只有单个节点">rblnk_singular</a>(&amp;r)) {
        ......
    }
</pre></div> </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00295">295</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga65fe4fdebdda77a66bb5b26d4c3c2910"></a><!-- doxytag: member="rblnk.h::rblnk_serialable" ref="ga65fe4fdebdda77a66bb5b26d4c3c2910" args="(rblnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int rblnk_serialable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断树是否可以序列化 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>即判断是否至少有一个节点 </dd></dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>真 </td></tr>
    <tr><td class="paramname">0</td><td>假 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="comment">// 判断是否可以序列化</span>
    <span class="keywordflow">if</span> (<a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga65fe4fdebdda77a66bb5b26d4c3c2910" title="判断树是否可以序列化">rblnk_serialable</a>(&amp;r)) {
        <a class="code" href="group___xE5_x8D_x95_xE7_xAB_xAF_xE7_xBA_xBF_xE5_xBD_xA2_xE5_xBA_x8F_xE8_xA1_xA8.html#gab7b8f6f20db0f3e5681fd2184b1ae60c" title="type类型表头">slseq_head</a> seq;
        <span class="comment">// 分配序列缓存</span>
        DATA** buf = (DATA**)malloc(<span class="keyword">sizeof</span>(DATA*) * avl_cnt);
        <span class="comment">// 序列化</span>
        <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gacaec0cfff7eb3001fe7b1d67b2d4fda0" title="将树进行序列化为一个有序序列">rblnk_serialize</a>(&amp;r, buf, DATA, node);
        <a class="code" href="group___xE5_x8D_x95_xE7_xAB_xAF_xE7_xBA_xBF_xE5_xBD_xA2_xE5_xBA_x8F_xE8_xA1_xA8.html#ga08213d0c7bcf381b466b18e3822c6934" title="初始化序列">SLSEQ_INIT_SERIAL</a>(&amp;seq, buf, avl_cnt);
        ......
        <span class="comment">// do something</span>
        ......
        <span class="comment">// 反序列化</span>
        <a class="code" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaa3905e4e6ba16c931fe97b3e43384360" title="根据树的序列进行反序列化为一个完整的树">rblnk_deserialize</a>(&amp;r, buf, avl_cnt, DATA, node);
        <span class="comment">// 释放缓存</span>
        free(buf);
    }
</pre></div> </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gacaec0cfff7eb3001fe7b1d67b2d4fda0" title="将树进行序列化为一个有序序列">rblnk_serialize</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaa3905e4e6ba16c931fe97b3e43384360" title="根据树的序列进行反序列化为一个完整的树">rblnk_deserialize</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00329">329</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gac7e13ffecf675371e361a25d258be3e7"></a><!-- doxytag: member="rblnk.h::rblnk_left" ref="gac7e13ffecf675371e361a25d258be3e7" args="(rblnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> rblnk_left </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到左子节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">node</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>rblnk_iter 返回左子节点 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gabf511bf9afe0448fc2ea1a9feaf77935" title="得到右子节点">rblnk_right</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00341">341</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gabf511bf9afe0448fc2ea1a9feaf77935"></a><!-- doxytag: member="rblnk.h::rblnk_right" ref="gabf511bf9afe0448fc2ea1a9feaf77935" args="(rblnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> rblnk_right </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到右子节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">node</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>rblnk_iter 返回右子节点 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gac7e13ffecf675371e361a25d258be3e7" title="得到左子节点">rblnk_left</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00353">353</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gac9b28b4b852f74baf30eda817e2144b1"></a><!-- doxytag: member="rblnk.h::rblnk_parent" ref="gac9b28b4b852f74baf30eda817e2144b1" args="(rblnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> rblnk_parent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到父节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">node</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>rblnk_iter 返回父节点 </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00364">364</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga6abde00d596cf397ea6ccc5e5724f1e0"></a><!-- doxytag: member="rblnk.h::rblnk_color" ref="ga6abde00d596cf397ea6ccc5e5724f1e0" args="(rblnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline uintptr_t rblnk_color </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到节点的颜色值 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">node</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>uintptr_t 返回颜色值 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">RBLNK_RED</td><td>红色 </td></tr>
    <tr><td class="paramname">RBLNK_BLACK</td><td>黑色 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00377">377</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga7f6bea5de9fffaed975df98753c20bed"></a><!-- doxytag: member="rblnk.h::rblnk_red" ref="ga7f6bea5de9fffaed975df98753c20bed" args="(rblnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int rblnk_red </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断节点是否是红色的 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">node</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>节点是红色的 </td></tr>
    <tr><td class="paramname">0</td><td>节点是黑色的 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00390">390</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga6e91c6985df0a43de84afc2c55d47c04"></a><!-- doxytag: member="rblnk.h::rblnk_black" ref="ga6e91c6985df0a43de84afc2c55d47c04" args="(rblnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int rblnk_black </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断节点是否是黑色的 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">node</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>节点是黑色的 </td></tr>
    <tr><td class="paramname">0</td><td>节点是红色的 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00403">403</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga40cf982b1d6c159daa42defa32844502"></a><!-- doxytag: member="rblnk.h::rblnk_is_root" ref="ga40cf982b1d6c159daa42defa32844502" args="(rblnk_iter itr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int rblnk_is_root </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td>
          <td class="paramname"><em>itr</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断当前节点是否是根节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>是根节点 </td></tr>
    <tr><td class="paramname">0</td><td>不是根节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00416">416</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga3acf0e85dbc729b064ccc9d696b194d4"></a><!-- doxytag: member="rblnk.h::rblnk_is_leaf" ref="ga3acf0e85dbc729b064ccc9d696b194d4" args="(rblnk_iter itr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int rblnk_is_leaf </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td>
          <td class="paramname"><em>itr</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断当前节点是否是叶子节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>是叶子节点 </td></tr>
    <tr><td class="paramname">0</td><td>不是叶子节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00429">429</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gada1dad989f8a0d4cc3d49fefdfbf04fc"></a><!-- doxytag: member="rblnk.h::rblnk_link" ref="gada1dad989f8a0d4cc3d49fefdfbf04fc" args="(rblnk_iter newly, rblnk_iter parent, rblnk_iter *plink)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void rblnk_link </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td>
          <td class="paramname"><em>newly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> *&#160;</td>
          <td class="paramname"><em>plink</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>链接两个节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">newly</td><td>新节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">parent</td><td>父节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">plink</td><td>父节点对应孩子指针。若newly加入parent的左子，则plink指向 parent的left成员，若newly加入parent的右子，则plink指向 parent的right成员 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>链接newly和parent节点 </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00445">445</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga3943690f21dc9dee488c35313f7d093f"></a><!-- doxytag: member="rblnk.h::rblnk_set_red" ref="ga3943690f21dc9dee488c35313f7d093f" args="(rblnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void rblnk_set_red </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>设置当前节点的颜色为红色 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">node</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00461">461</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga700dde2e01a11e733893be4dccaca0c6"></a><!-- doxytag: member="rblnk.h::rblnk_set_black" ref="ga700dde2e01a11e733893be4dccaca0c6" args="(rblnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void rblnk_set_black </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>设置当前节点的颜色为黑色 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">node</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00471">471</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gab43d3dd00f5f9797f2e6728804388546"></a><!-- doxytag: member="rblnk.h::rblnk_set_color" ref="gab43d3dd00f5f9797f2e6728804388546" args="(rblnk_node *node, uintptr_t color)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void rblnk_set_color </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uintptr_t&#160;</td>
          <td class="paramname"><em>color</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>设置当前节点的颜色 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">node</td><td>当前节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">color</td><td>新颜色，有RBLNK_RED(红色)和RBLNK_BLACK(黑色)两种 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00483">483</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga6f05bc6d011c149bc85e3667240a6f27"></a><!-- doxytag: member="rblnk.h::rblnk_set_parent" ref="ga6f05bc6d011c149bc85e3667240a6f27" args="(rblnk_node *node, rblnk_node *parent)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void rblnk_set_parent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *&#160;</td>
          <td class="paramname"><em>parent</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>设置当前节点的父节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">node</td><td>当前节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">parent</td><td>新的父节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00496">496</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga5474c6caddd6bdba98f8e126d411d580"></a><!-- doxytag: member="rblnk.h::rblnk_set_parent_if" ref="ga5474c6caddd6bdba98f8e126d411d580" args="(rblnk_node *node, rblnk_node *parent)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void rblnk_set_parent_if </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *&#160;</td>
          <td class="paramname"><em>parent</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>仅在node不为空时，设置node的父节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">node</td><td>当前节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">parent</td><td>新的父节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00509">509</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga53c43d6dc5b3cb6ab7a416fae7c5f80a"></a><!-- doxytag: member="rblnk.h::rblnk_set_parent_color" ref="ga53c43d6dc5b3cb6ab7a416fae7c5f80a" args="(rblnk_node *node, rblnk_node *parent, uintptr_t color)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void rblnk_set_parent_color </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uintptr_t&#160;</td>
          <td class="paramname"><em>color</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>同时设置节点的父节点和颜色值 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">node</td><td>当前节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">parent</td><td>新的父节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">height</td><td>新的高度值，有RBLNK_RED(红色)和RBLNK_BLACK(黑色)两种 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00523">523</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga553fbabdc6b8bfa429d2a8dd41be744c"></a><!-- doxytag: member="rblnk.h::rblnk_node_init" ref="ga553fbabdc6b8bfa429d2a8dd41be744c" args="(rblnk_node *node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void rblnk_node_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf7a22577e5f8f2d8c3ab96f378465658">rblnk_node</a> *&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>初始化节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">node</td><td>指定节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00534">534</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gadfe6e5c9ffa167c1536634f45c9ff8ce"></a><!-- doxytag: member="rblnk.h::rblnk_iter_replace" ref="gadfe6e5c9ffa167c1536634f45c9ff8ce" args="(rblnk_root *root, rblnk_iter victim, rblnk_iter newly)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void rblnk_iter_replace </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td>
          <td class="paramname"><em>victim</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td>
          <td class="paramname"><em>newly</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>用新节点替换旧节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">victim</td><td>受害目标节点 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">newly</td><td>新节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00549">549</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga786e6ac4f90eaed9db8547e2c2a20b72"></a><!-- doxytag: member="rblnk.h::rblnk_replace" ref="ga786e6ac4f90eaed9db8547e2c2a20b72" args="(rblnk_root *victim, rblnk_root *newly)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void rblnk_replace </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>victim</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>newly</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>用新的树根替换旧树根 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">victim</td><td>受害目标树根 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">newly</td><td>新树根 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00577">577</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga9dacf7edeb485b8997ff6cac7846a0c5"></a><!-- doxytag: member="rblnk.h::rblnk_swap" ref="ga9dacf7edeb485b8997ff6cac7846a0c5" args="(rblnk_root *a, rblnk_root *b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void rblnk_swap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>交换两个树 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">a</td><td>第一个树 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">b</td><td>第二个树 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00588">588</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga43f9873a6ad90b95af037efd8b715313"></a><!-- doxytag: member="rblnk.h::rblnk_exist" ref="ga43f9873a6ad90b95af037efd8b715313" args="(rblnk_root *root, rblnk_iter itr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API int rblnk_exist </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td>
          <td class="paramname"><em>itr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断一个节点是否存在于树中 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>指定节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>存在 </td></tr>
    <tr><td class="paramname">0</td><td>不存在 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="rblnk_8c_source.html">rblnk.c</a>第<a class="el" href="rblnk_8c_source.html#l00340">340</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga282ecc18962ddc54b578df7044dc9de9"></a><!-- doxytag: member="rblnk.h::rblnk_at" ref="ga282ecc18962ddc54b578df7044dc9de9" args="(rblnk_root *root, size_t index)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> rblnk_at </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到正向索引对应的节点的迭代器 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>指定正向索引 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>rblnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf747daec306db3fdfaa6653558ce2062" title="得到逆向索引对应的节点的迭代器">rblnk_reverse_at</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00612">612</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaf747daec306db3fdfaa6653558ce2062"></a><!-- doxytag: member="rblnk.h::rblnk_reverse_at" ref="gaf747daec306db3fdfaa6653558ce2062" args="(rblnk_root *root, size_t index)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> rblnk_reverse_at </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到逆向索引对应的节点的迭代器 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>指定逆向索引 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>rblnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga282ecc18962ddc54b578df7044dc9de9" title="得到正向索引对应的节点的迭代器">rblnk_at</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00626">626</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gab434b46c3cb032b3114a0c292ee50c52"></a><!-- doxytag: member="rblnk.h::rblnk_front" ref="gab434b46c3cb032b3114a0c292ee50c52" args="(rblnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> rblnk_front </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到树的最左端节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>rblnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga78d61eaa02e5a1af07b2da867776fd53" title="得到树的最右端节点">rblnk_back</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8c_source.html">rblnk.c</a>第<a class="el" href="rblnk_8c_source.html#l00353">353</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga78d61eaa02e5a1af07b2da867776fd53"></a><!-- doxytag: member="rblnk.h::rblnk_back" ref="ga78d61eaa02e5a1af07b2da867776fd53" args="(rblnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> rblnk_back </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到树的最右端节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>rblnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gab434b46c3cb032b3114a0c292ee50c52" title="得到树的最左端节点">rblnk_front</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8c_source.html">rblnk.c</a>第<a class="el" href="rblnk_8c_source.html#l00367">367</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gad090e3e5ab9b4f09b94e968233554a6b"></a><!-- doxytag: member="rblnk.h::rblnk_begin" ref="gad090e3e5ab9b4f09b94e968233554a6b" args="(rblnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> rblnk_begin </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到指向正向起始位置的迭代器 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>rblnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gac850e7c259076759a9a8d5fde09e2104" title="得到指向正向终止位置的迭代器">rblnk_end</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga9af3a349f64b4e1476c529187f24d4bd" title="得到当前迭代器的正向终止位置">rblnk_end_of</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gae58917b51be46e3525e90954cd3ab664" title="得到指向逆向起始位置的迭代器">rblnk_rbegin</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga34d7b697a7bff2a1a90796e9c384f293" title="得到指向逆向终止位置的迭代器">rblnk_rend</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00656">656</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gac850e7c259076759a9a8d5fde09e2104"></a><!-- doxytag: member="rblnk.h::rblnk_end" ref="gac850e7c259076759a9a8d5fde09e2104" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> rblnk_end </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到指向正向终止位置的迭代器 </p>
<dl class="return"><dt><b>返回:</b></dt><dd>rblnk_iter 返回迭代器，永远返回NULL </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gad090e3e5ab9b4f09b94e968233554a6b" title="得到指向正向起始位置的迭代器">rblnk_begin</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga9af3a349f64b4e1476c529187f24d4bd" title="得到当前迭代器的正向终止位置">rblnk_end_of</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gae58917b51be46e3525e90954cd3ab664" title="得到指向逆向起始位置的迭代器">rblnk_rbegin</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga34d7b697a7bff2a1a90796e9c384f293" title="得到指向逆向终止位置的迭代器">rblnk_rend</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00667">667</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga9af3a349f64b4e1476c529187f24d4bd"></a><!-- doxytag: member="rblnk.h::rblnk_end_of" ref="ga9af3a349f64b4e1476c529187f24d4bd" args="(rblnk_iter cur)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> rblnk_end_of </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td>
          <td class="paramname"><em>cur</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到当前迭代器的正向终止位置 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>迭代器 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>rblnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gad090e3e5ab9b4f09b94e968233554a6b" title="得到指向正向起始位置的迭代器">rblnk_begin</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gac850e7c259076759a9a8d5fde09e2104" title="得到指向正向终止位置的迭代器">rblnk_end</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00679">679</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gae58917b51be46e3525e90954cd3ab664"></a><!-- doxytag: member="rblnk.h::rblnk_rbegin" ref="gae58917b51be46e3525e90954cd3ab664" args="(rblnk_root *root)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> rblnk_rbegin </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到指向逆向起始位置的迭代器 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">root</td><td>树根 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>rblnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga34d7b697a7bff2a1a90796e9c384f293" title="得到指向逆向终止位置的迭代器">rblnk_rend</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaa826e37d560cfadd9527078b7541a8d5" title="得到当前迭代器的逆向终止位置">rblnk_rend_of</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gad090e3e5ab9b4f09b94e968233554a6b" title="得到指向正向起始位置的迭代器">rblnk_begin</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gac850e7c259076759a9a8d5fde09e2104" title="得到指向正向终止位置的迭代器">rblnk_end</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00691">691</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga34d7b697a7bff2a1a90796e9c384f293"></a><!-- doxytag: member="rblnk.h::rblnk_rend" ref="ga34d7b697a7bff2a1a90796e9c384f293" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> rblnk_rend </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到指向逆向终止位置的迭代器 </p>
<dl class="return"><dt><b>返回:</b></dt><dd>rblnk_iter 返回迭代器，永远返回NULL </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gae58917b51be46e3525e90954cd3ab664" title="得到指向逆向起始位置的迭代器">rblnk_rbegin</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaa826e37d560cfadd9527078b7541a8d5" title="得到当前迭代器的逆向终止位置">rblnk_rend_of</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gad090e3e5ab9b4f09b94e968233554a6b" title="得到指向正向起始位置的迭代器">rblnk_begin</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gac850e7c259076759a9a8d5fde09e2104" title="得到指向正向终止位置的迭代器">rblnk_end</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00702">702</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaa826e37d560cfadd9527078b7541a8d5"></a><!-- doxytag: member="rblnk.h::rblnk_rend_of" ref="gaa826e37d560cfadd9527078b7541a8d5" args="(rblnk_iter cur)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> rblnk_rend_of </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td>
          <td class="paramname"><em>cur</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到当前迭代器的逆向终止位置 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>迭代器 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>rblnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gae58917b51be46e3525e90954cd3ab664" title="得到指向逆向起始位置的迭代器">rblnk_rbegin</a>, <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga34d7b697a7bff2a1a90796e9c384f293" title="得到指向逆向终止位置的迭代器">rblnk_rend</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00714">714</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga724a069a61ec122e5a22a515eb6fc1ab"></a><!-- doxytag: member="rblnk.h::rblnk_next" ref="ga724a069a61ec122e5a22a515eb6fc1ab" args="(rblnk_iter cur)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> rblnk_next </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td>
          <td class="paramname"><em>cur</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到当前节点的中序后继节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cur</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>rblnk_iter 返回后继节点，若无后继，则返回NULL </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaf2372e7e19baf6c5fc1c2d1e46bcda2a" title="得到当前节点的中序前驱节点">rblnk_prev</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8c_source.html">rblnk.c</a>第<a class="el" href="rblnk_8c_source.html#l00381">381</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaf2372e7e19baf6c5fc1c2d1e46bcda2a"></a><!-- doxytag: member="rblnk.h::rblnk_prev" ref="gaf2372e7e19baf6c5fc1c2d1e46bcda2a" args="(rblnk_iter cur)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> rblnk_prev </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td>
          <td class="paramname"><em>cur</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到当前节点的中序前驱节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cur</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>rblnk_iter 返回前驱节点，若无前驱，则返回NULL </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga724a069a61ec122e5a22a515eb6fc1ab" title="得到当前节点的中序后继节点">rblnk_next</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8c_source.html">rblnk.c</a>第<a class="el" href="rblnk_8c_source.html#l00401">401</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gae9ac9b2b5c33a92e0306a09346ef32cc"></a><!-- doxytag: member="rblnk.h::rblnk_advance" ref="gae9ac9b2b5c33a92e0306a09346ef32cc" args="(rblnk_iter cur, int dist)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API <a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a> rblnk_advance </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga588a122bb585e30d2dbc7ef1e6cb0297">rblnk_iter</a>&#160;</td>
          <td class="paramname"><em>cur</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dist</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>给迭代器增加一段距离或减小一段距离 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cur</td><td>迭代器 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dist</td><td>增加的距离。正数时，表示增加；负数时，表示减小 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>rblnk_iter 返回新迭代器 </dd></dl>

<p>在文件<a class="el" href="rblnk_8c_source.html">rblnk.c</a>第<a class="el" href="rblnk_8c_source.html#l00328">328</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga7b860940aefd704957bb73e2a56a1584"></a><!-- doxytag: member="rblnk.h::rblnk_clear" ref="ga7b860940aefd704957bb73e2a56a1584" args="(rblnk_root *root, rblnk_pr1 erase_handler)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void rblnk_clear </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrblnk__root.html">rblnk_root</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#ga7417aa626d7a0f898b5338b97411d546">rblnk_pr1</a>&#160;</td>
          <td class="paramname"><em>erase_handler</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>清空树 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">root</td><td>树根 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">erase_handler</td><td>移除响应函数，通常用于监视和释放节点，可以传递NULL, 表示不为删除的节点调用响应来处理 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>函数会为每一个被移除的节点调用erase_handler来处理节点 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE7_xBA_xA2_xE9_xBB_x91_xE6_xA0_x91.html#gaa931c3dedfb8e0f288017fbf7a03b6b8" title="移除区域内的节点">rblnk_erases</a> </dd></dl>

<p>在文件<a class="el" href="rblnk_8h_source.html">rblnk.h</a>第<a class="el" href="rblnk_8h_source.html#l00756">756</a>行定义。</p>

</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>数据结构</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>变量</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>类型定义</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>宏定义</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Generated at 2015年七月16日 星期四 12:00:42 for Navo Portable Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>
